package com.thon.entity.project;

// Generated 2013-9-23 19:12:56 by Hibernate Tools 3.4.0.CR1

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.thon.entity.util.IdEntity;

/**
 * MeRegions generated by hbm2java
 */
@Entity
@Table(name = "regions")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Region extends IdEntity {

	private static final long serialVersionUID = 8058726489306429082L;
	private String name;
	private String code;
	private Byte level;
	private Integer parentId;
	
	//private Region parentRegion;

	public Region() {
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Byte getLevel() {
		return this.level;
	}

	public void setLevel(Byte level) {
		this.level = level;
	}

	//@Transient
	public Integer getParentId() {
		return this.parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	
	/*@NotFound(action=NotFoundAction.IGNORE)
	@ManyToOne
	@JoinColumn(name="parentId")
	@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
	public Region getParentRegion() {
		return parentRegion;
	}
	public void setParentRegion(Region parentRegion) {
		this.parentRegion = parentRegion;
	}*/

}
